//
//  ZYImageDownloader.h
//  ZYWebImage
//
//  Created by wangzhipan on 2025/3/6.
//

#import <Foundation/Foundation.h>
#import "ZYWebImageConst.h"
#import "IZYWebImageProtocol.h"
#import "ZYDownloadTask.h"


NS_ASSUME_NONNULL_BEGIN


@interface ZYImageDownloader : NSObject
@property (nonatomic, assign, getter=isSuspended) BOOL suspended;
@property (nonatomic, assign, readonly) NSUInteger currentDownloadCount;


+ (instancetype)sharedInstance;

- (nullable ZYDownloadTask *)downloadImageWithUrlStr:(nullable NSString *)urlStr
                                           completed:(nullable ZYDownloadCompleted)completed;

- (void)cancelAllDownloads;
@end

NS_ASSUME_NONNULL_END
